package bulletbehavior 
{
	/**
	 * ...
	 * @author morgan
	 */
	public class TypeCyclingBehavior extends BulletBehavior
	{
		public var interval:Number;
		public var pattern:Array;
		public function TypeCyclingBehavior(interval:Number, pattern:Array) 
		{
			this.interval = interval;
			this.pattern = pattern;
		}
		
		override public function onUpdate(b:Bullet):void 
		{
			b.type = pattern[Math.floor(b.age / interval) % pattern.length];
			// MAKE IT CHANGE IMAGES!
			super.onUpdate(b);
		}
		
	}

}